﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace CPPEI.Coolzon.Designer.Views
{
    public class UIPartCommand
    {
        static UIPartCommand()
        {
            InputGestureCollection inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.C, ModifierKeys.Control, "Ctrl+C"));
            Copy = new RoutedUICommand("复制", "Copy", typeof(UIPartCommand), inputs);
            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.V, ModifierKeys.Control, "Ctrl+V"));
            Paste = new RoutedUICommand("粘贴", "Paste", typeof(UIPartCommand), inputs);
            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.X, ModifierKeys.Control, "Ctrl+X"));
            Cut = new RoutedUICommand("剪切", "Cut", typeof(UIPartCommand), inputs);
            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.Delete, ModifierKeys.None));
            RemovePart = new RoutedUICommand("删除", "Delete", typeof(UIPartCommand), inputs);

            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.Z, ModifierKeys.Control, "Ctrl+Z"));
            Undo = new RoutedUICommand("撤销", "Undo", typeof(UIPartCommand), inputs);
            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.Y, ModifierKeys.Control, "Ctrl+Y"));
            Redo = new RoutedUICommand("重做", "Redo", typeof(UIPartCommand), inputs);

            BringToFront = new RoutedUICommand("置于顶层", "Bring To Front", typeof(UIPartCommand));
            SendToBack = new RoutedUICommand("置于底层", "Send To Back", typeof(UIPartCommand));
            BringLayerForward = new RoutedUICommand("上移一层", "Bring Layer Forward", typeof(UIPartCommand));
            SendLayerBackward = new RoutedUICommand("下移一层", "Send Layer Backward", typeof(UIPartCommand));
            ZoomToShowAll = new RoutedUICommand("适合全部", "ZoomToShowAll", typeof(UIPartCommand));
            ZoomToNormal = new RoutedUICommand("正常大小", "ZoomToNormal", typeof(UIPartCommand));

            inputs = new InputGestureCollection();
            inputs.Add(new KeyGesture(Key.Escape, ModifierKeys.None, "Esc"));
            CancelSelectedToolboxItem = new RoutedUICommand("选择指针", "CancelSelectedToolboxItem", typeof(UIPartCommand), inputs);
        }

        [DefaultExecutedClass(typeof(CancelSelectedToolboxItemCommand))]
        public static RoutedUICommand CancelSelectedToolboxItem
        {
            get; set;
        }

        [DefaultExecutedClass(typeof(CopyCommand))]
        public static RoutedUICommand Copy { get; set; }

        [DefaultExecutedClass(typeof(PasteCommand))]
        public static RoutedUICommand Paste { get; set; }

        [DefaultExecutedClass(typeof(CutCommand))]
        public static RoutedUICommand Cut { get; set; }

        [DefaultExecutedClass(typeof(RemovePartCommand))]
        public static RoutedUICommand RemovePart { get; set; }

        [DefaultExecutedClass(typeof(RedoCommand))]
        public static RoutedUICommand Redo { get; set; }

        [DefaultExecutedClass(typeof(UndoCommand))]
        public static RoutedUICommand Undo { get; set; }

        [DefaultExecutedClass(typeof(BringLayerForwardCommand))]
        public static RoutedUICommand BringLayerForward { get; set; }

        [DefaultExecutedClass(typeof(SendLayerBackwardCommand))]
        public static RoutedUICommand SendLayerBackward { get; set; }

        [DefaultExecutedClass(typeof(BringToFrontCommand))]
        public static RoutedUICommand BringToFront { get; set; }

        [DefaultExecutedClass(typeof(SendToBackCommand))]
        public static RoutedUICommand SendToBack { get; set; }

        [DefaultExecutedClass(typeof(ZoomToShowAllCommand))]
        public static RoutedUICommand ZoomToShowAll { get; set; }

        [DefaultExecutedClass(typeof(ZoomToNormalCommand))]
        public static RoutedUICommand ZoomToNormal { get; set; }
    }
}
